Method and apparatus for tracking object, and method and apparatus for calculating object pose information

ABSTRACT

A method and apparatus for tracking an object, and a method and apparatus for calculating object pose information are provided. The method of tracking the object obtains object feature point candidates by using a difference between pixel values of neighboring frames. A template matching process is performed in a predetermined region having the object feature point candidates as the center. Accordingly, it is possible to reduce a processing time needed for the template matching process. The method of tracking the object is robust in terms of sudden changes in lighting and partial occlusion. In addition, it is possible to track the object in real time. In addition, since the pose of the object, the pattern of the object, and the occlusion of the object are determined, detailed information on action patterns of the object can be obtained in real time.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application claims the benefit of Korean Patent Application No. 10-2007-0012798, filed on Feb. 7, 2007, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method and apparatus for tracking an object, and a method and apparatus for calculating object pose information, and more particularly, to a method and apparatus for automatically tracking an object in real time and estimating an object pose from an input video image, and a method and apparatus for calculating object pose information.

2. Description of the Related Art

A technique of detecting a predetermined object from a video image and tracking the predetermined object has been developed in the fields of security and face recognition. In the case of a security system, in order to automatically detect a person who enters a detection zone, it is necessary to detect an object which enters the detection zone and track the motion of the object. A difference method is used as a typical method of tracking an object.

In the difference method, the object is tracked by using the difference between an input image obtained by an image acquisition device and a prepared reference image.

In US patent publication No. 2003/0031344, a method is disclosed in which a user directly assigns locations of at least one tracking node, reinitializes the tracking nodes, and automatically tracks off-line face features based on the renormalized tracking nodes. However, in the aforementioned patent, when the object is changed, the user has to directly renormalize the tracking nodes so as to track a new object.

In US patent publication No. 2004/0240708, a method of using a repeated sum of squares difference (SSD) and a method in which a pose is estimated by recognizing a shape change of a 2-dimensional (2D) triangle are disclosed. However, in this case, since a face image is simplified as a 2D triangle, the accuracy of estimating the poses decreases.

In addition, existing methods of tracking an object using an optical flow are weak in terms of partial occlusion. It takes much processing time to track an object by using the existing methods. Accordingly, it is difficult to apply the existing methods to a system for tracking an object in real time.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for tracking an object in real time with improved accuracy capable of reducing a processing time needed for a template matching process, which is robust in terms of sudden changes in lighting and partial occlusion. The present invention also provides a method and apparatus for calculating object pose information capable of determining information on action patterns of an object such as poses of the object, patterns of the object, and occlusion of the object in real time.

The present invention also provides a computer-recordable medium having embodied thereon a computer program for executing the video image tracking method.

According to an aspect of the present invention, there is provided a method of tracking an object comprising: detecting predetermined object feature points in a (N−1)-th (N is a positive integer greater than 1) frame; estimating object feature point candidates of an N-th frame by using a difference between a pixel value of the (N−1)-th frame and a pixel value of the N-th frame; and estimating object feature points of the N-th frame by searching a predetermined region surrounding the estimated object feature point candidates of the N-th frame for a template similar to a predetermined template including the detected object feature points.

According to another aspect of the present invention, there is provided a method of calculating object pose information comprising: detecting predetermined object feature points in a (N−1)-th (N is a positive integer greater than 1) frame; estimating object feature point candidates of an N-th frame by using a difference between a pixel value of the (N−1)-th frame and a pixel value of the N-th frame; estimating object feature points of the N-th frame by searching a predetermined region surrounding the estimated object feature point candidates of the N-th frame for a template similar to a predetermined template including the detected object feature points; and calculating object pose information by using coordinate values detected in the (N−1)-th frame and coordinate values of the object feature points detected in the N-th frame.

According to another aspect of the present invention, there is provided an apparatus for tracking a video image object, the apparatus comprising: an initialization unit which initializes a tracking process by detecting object feature points from a video image; a first tracking unit which estimates object feature point candidates of an N-th frame by using a difference between a pixel value of an (N−1)-th (N is a positive integer greater than 1) frame and a pixel value of the N-th frame; and a second tracking unit which searches a predetermined region surrounding the determined object feature point candidates for a template similar to a template including the object feature points of the (N−1)-th frame and estimates the object feature points.

According to another aspect of the present invention, there is provided an apparatus for calculating object pose information, the apparatus comprising: an initialization unit which initializes a tracking process by detecting object feature points from a video image; a first tracking unit which estimates object feature point candidates of an N-th frame by using a difference between a pixel value of an (N−1)-th (N is a positive integer greater than 1) frame and a pixel value of the N-th frame; a second tracking unit which searches a predetermined region surrounding the determined object feature point candidates for a template similar to a template including the object feature points of the (N−1)-th frame and estimates the object feature points; and an object pose information calculation unit which calculates object pose information by using coordinate values of the object feature points detected by initializing the tracking process and coordinate values of the object feature points of the N-th frame.

According to another aspect of the present invention, there is provided a computer readable recording medium in which the method of tracking a video image object can be implemented on a computer.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

FIG. 1 is a block diagram illustrating an apparatus for tracking an object according to an embodiment of the present invention;

FIG. 2 is a block diagram illustrating an apparatus for calculating object pose information according to an embodiment of the present invention;

FIG. 3 is a reference view for illustrating a concept of tracking an object according to an embodiment of the present invention;

FIG. 4 is a block diagram illustrating a detailed structure of a pose estimation unit illustrated in FIG. 2;

FIG. 5 is a flowchart illustrating a method of tracking an object according to an embodiment of the present invention;

FIG. 6 is a flowchart illustrating a method of calculating object pose information according to an embodiment of the present invention; and

FIG. 7 is a reference view illustrating an experimental result of a method of calculating object pose information.

DETAILED DESCRIPTION OF THE INVENTION

Now, preferred embodiments of a method and apparatus for tracking an object according to an embodiment of the present invention will be described in detail with reference to the attached drawings.

FIG. 1 is a block diagram illustrating an apparatus for tracking an object according to an embodiment of the present invention. In the current embodiment, the apparatus for tracking an object includes an initialization unit 110, a first tracking unit 120, and a second tracking unit 130.

The initialization unit 110 detects predetermined feature points in the (N−1)-th frame. Specifically, the initialization unit 110 detects a face image in an image of the first frame and selects face feature points which represent main features of the face in the detected face image. In this case, the object is a human face. For example, the detected feature points of the object may include two points corresponding to center locations of eyes, two points corresponding to center locations of eyebrows, one point corresponding to an end of a nose, two points corresponding to both ends of lips, and a point corresponding to a top center location of an upper lip.

Methods of detecting feature points of an object (hereinafter, object feature points) may be active appearance models (AAM) or active shape models (ASM). In the ASM, locations of eyes are determined and locations of other parts are determined based on the detected locations of the eyes by using information on the shapes of other parts, for example, a nose, a mouth, and eyebrows depending on a generic model. In the AAM, feature points capable of effectively describing face features are detected by further considering texture information in addition to the shape information. In the current embodiment, the initialization unit 110 detects eight feature points including two eyebrows, two eyes, one nose, two ends of the lips, and a top center location of an upper lip, as shown in image A illustrated in FIG. 3, by using the AAM.

The first tracking unit 120 determines object feature candidates of the N-th frame by using a difference between a pixel value of the (N−1)-th frame and a pixel value of the N-th frame. When the face feature points are detected in the first frame by the initialization unit 110, the first tracking unit 120 calculates an optical flow in which a difference between a pixel value of the first frame and a pixel value of the second frame is minimized. For example, a gray level of a template image of predetermined size having the face feature point detected in the first frame as the center and a gray level of a template image of the second frame corresponding to the template image of the first frame are obtained, and an optical flow can be calculated by using a difference between the gray levels of the neighboring frames of each pixel. In the current embodiment, the optical flow is calculated by using a Lucas-Kanade-Tomasi (LKT) algorithm, and the optical flow v in which a value of ε(v) is minimized according to the following Equations 1 to 5 can be calculated.

$\begin{matrix} \begin{matrix} {{ɛ(v)} = {ɛ\left( {v_{x},v_{y}} \right)}} \\ {= {\sum\limits_{x = {u_{x} - \omega_{x}}}^{u_{x} + \omega_{x}}{\sum\limits_{y = {u_{y} - \omega_{y}}}^{u_{y} + \omega_{y}}\left( {{I\left( {x,y} \right)} - {J\left( {{x + v_{x}},{y + v_{y}}} \right)}} \right)^{2}}}} \end{matrix} & \left\lbrack {{Equation}\mspace{20mu} 1} \right\rbrack \\ {{{I_{x}\left( {x,y} \right)} = \frac{{I\left( {{x + 1},y} \right)} - {I\left( {{x - 1},y} \right)}}{2}},{{I_{y}\left( {x,y} \right)} = \frac{{I\left( {x,{y + 1}} \right)} - {I\left( {x,{y - 1}} \right)}}{2}}} & \left\lbrack {{Equation}\mspace{20mu} 2} \right\rbrack \\ {{{G\left( {u_{x},u_{y}} \right)} = {\sum\limits_{x = {u_{x} - \omega_{x}}}^{u_{x} + \omega_{x}}{\sum\limits_{y = {u_{y} - \omega_{y}}}^{u_{y} + \omega_{y}}\begin{bmatrix} I_{x}^{2} & {I_{x}I_{y}} \\ {I_{x}I_{y}} & I_{y}^{2} \end{bmatrix}}}},{{\delta\;{I\left( {x,y} \right)}} = {{I\left( {x,y} \right)} - {J\left( {x,y} \right)}}}} & \left\lbrack {{Equation}\mspace{20mu} 3} \right\rbrack \\ {\overset{\_}{b} = {\sum\limits_{x = {u_{x} - \omega_{x}}}^{u_{x} + \omega_{x}}{\sum\limits_{y = {u_{y} - \omega_{y}}}^{u_{y} + \omega_{y}}\begin{bmatrix} {\delta\;{II}_{x}} \\ {\delta\;{II}_{y}} \end{bmatrix}}}} & \left\lbrack {{Equation}\mspace{20mu} 4} \right\rbrack \\ {v = {G^{- 1}\overset{\_}{b}}} & \left\lbrack {{Equation}\mspace{20mu} 5} \right\rbrack \end{matrix}$

Here, I is a previous (N−1)-th frame, J is a current N-th frame, u=(u_(x), u_(y)) is a feature point in the previous frame, v=(v_(x), v_(y)) is an optical flow, (w_(x), w_(y)) is a template size of an image of which optical flow is calculated, and I_(x) and I_(y) are a differential image value of I.

The second tracking unit 130 searches the N-th frame for a template similar to the template including object feature points of the (N−1)-th frame and estimates the object feature points in the N-th frame based on the result of the search. Specifically, the second tracking unit 130 searches a predetermined search region surrounding object feature point candidates determined by the first tracking unit 120 as a template similar to the template of the (N−1)-th frame. The size of the search region has to be greater than that of the template. It is possible to reduce a processing time needed for searching for the most similar template by introducing the search region unlike in the existing techniques.

In the current embodiment, a template matching technique is used as the method of searching for the most similar template. It is possible to determine a template, in which a value ρ, according to Equation 6, is at a minimal, as the most similar template.

$\begin{matrix} {\rho = \frac{\sum\limits_{a = {- \omega_{x}}}^{+ \omega_{x}}{\sum\limits_{b = {- \omega_{y}}}^{+ \omega_{y}}\left( {\left( {{I\left( {{u_{x} + a},{u_{y} + b}} \right)} - \overset{\_}{I}} \right)\left( {{J\left( {{x + a},{y + b}} \right)} - \overset{\_}{J}} \right)} \right)}}{\sqrt{\sum\limits_{a = {- \omega_{x}}}^{+ \omega_{x}}{\sum\limits_{b = {- \omega_{y}}}^{+ \omega_{y}}{\left( \left( {{I\left( {{u_{x} + a},{u_{y} + b}} \right)} - \overset{\_}{I}} \right) \right)^{2}{\sum\limits_{a = {- \omega_{x}}}^{+ \omega_{x}}{\sum\limits_{b = {- \omega_{y}}}^{+ \omega_{y}}\left( \left( {{J\left( {{x + a},{y + b}} \right)} - \overset{\_}{J}} \right) \right)^{2}}}}}}}} & \left\lbrack {{Equation}\mspace{20mu} 6} \right\rbrack \end{matrix}$

Here, I is the previous (N−1)-th frame, J is the current N-th frame, u=(u_(x), u_(y)) is a feature point in the previous frame, v=(v_(x), v_(y)) is an optical flow, (w_(x), w_(y)) is a template size of an image of which optical flow is calculated, and p is a correlation coefficient. (x, y), at which the value ρ calculated using Equation 6 is at a maximum, is a coordinate of a feature point of the N-th frame corresponding to a feature point of the (N−1)-th frame. The second tracking unit 130 calculates the value ρ depending on any (x, y) order pair and searches for (x, y) at which the value ρ is at a maximum. The search region has a predetermined size (S_(x), S_(y)) having a feature point candidate determined by the first tracking unit 120 as a center.

FIG. 3 is a reference view for illustrating a concept of tracking an object according to an embodiment of the present invention.

A video image A is the first frame image. Eight points located at eyebrows, eyes, a nose, and lips are feature points of a face image. A video image A′ is used to illustrate a concept of tracking an object. The video image A′ is obtained by representing only a profile of a person and a location of a right eye in the video image A. a is a template region, u=(u_(x), u_(y)) is a feature point of a right eye, and 2w_(x) and 2w_(y) are the length and width of the template region. A video image B is the second frame image. The video image B is a video image which represents a case where the person in the first frame moves to the right. u′ is an object feature point candidate determined by the first tracking unit 120, u″ is an object feature point determined by the second tracking unit 130, and 2S_(x) and 2S_(y) are the length and width of a search region.

The first tracking unit 120 calculates a candidate u′ with respect to a moving point of u=(u_(x), u_(y)) by using the LKT method. The second tracking unit 130 determines a moving point u″ of u=(u_(x), u_(y)) by performing a template matching process. Specifically, the second tracking unit 130 searches for a template which is closely correlated with a template a in the search region b having the point u′ as the center and determines the center point of the found template to be an object feature point u″ of the second frame.

FIG. 2 is a block diagram illustrating an apparatus for calculating object pose information according to an embodiment of the present invention. The apparatus for calculating object pose information according to the current embodiment includes an initialization unit 210, a first tracking unit 220, a second tracking unit 230, and an object pose information generation unit 240. The apparatus for calculating the object pose information, as illustrated in FIG. 2, has substantially the same structure as the apparatus for tracking the object, as illustrated in FIG. 1, except that the apparatus for calculating the object pose information further includes an object pose information generation unit 240.

The initialization unit 210 is substantially the same as the initialization unit 110 shown in FIG. 1. FIG. 2 discloses a detailed block structure for the initialization unit 210. In the current embodiment, the initialization unit 210 includes an object detection unit 211 and an object feature point detection unit 212. The object detection unit 211 detects a face image from the video image of the first frame. The object feature point detection unit 212 selects feature points with respect to main parts of the face from the face image detected by the object detection unit 211 as the object feature points. Specifically, the object feature point detection unit 212 detects the aforementioned feature points as the object feature points by using the AAM or ASM.

The first tracking unit 220 tracks the object feature points detected by the object feature point detection unit 212. The first tracking unit 220 calculates an optical flow in which a difference between a pixel value of the (N−1)-th frame and a pixel value of the N-th frame is minimized based on the LKT algorithm. The second tracking unit 230 searches a predetermined search region surrounding the object feature point candidate determined by the first tracking unit 120 as a template similar to the template of the (N−1)-th frame.

The object pose information generation unit 240 includes a pose estimation unit 250, an occlusion estimation unit 260, and a pattern estimation unit 270.

The pose estimation unit 250 estimates the pose information on the object of the N-th frame. The pose estimation unit 250 estimates the object pose information of the N-th frame by using feature point information for each frame such as information on initialized feature points, information on a generic model, information on camera parameters, and information on heights of the object feature points. Here, an example of the object pose information is view information, that is, information on a 3-dimensional (3D) direction in which the face of the person looks. An example of the information on the feature points is coordinate information on the aforementioned eight feature points. The information on the generic model is determined by a previous learning process using a plurality of training face-images. An example of the information on the generic model is 3D view information depending on eight feature points. An example of the information on the camera parameters is a focal distance. An example of information on height values of the object feature points is information on the heights of eyes, a noise, lips, and eyebrows when a face is viewed as a side profile. The heights of the end of the nose, the lips and the eyebrows can be represented by a ratio 16 to 5 to 3 on the basis of the height of the eyes.

FIG. 4 is a block diagram illustrating a detailed structure of the pose estimation unit 250 illustrated in FIG. 2.

The pose estimation unit 250 includes an initialized feature point storage unit 251, a current frame object feature point storage unit 252, a 3D generic model storage unit 253, a camera parameter storage unit 254, an object feature point height value table storage unit 255, and a pose from orthography and scaling with iterations (POSIT) unit 256. The aforementioned storage units 251 to 255 respectively store information on initialized object feature points, information on N-th frame feature points, 3D information on a generic model, information on camera parameters, and information on heights of the object feature points. The pose estimation unit 250 calculates information on a direction in which the object faces, for example, a rotation matrix having a roll, a pitch, and a yaw as components. The POSIT unit 256 calculates object pose information by using a POSIT that is an algorithm for calculating the object pose information. The POSIT is suitable to calculate the object pose information in real time as an algorithm for searching for an object pose from a single image.

Referring back to FIG. 2, an occlusion estimation unit 260 estimates whether the object feature points are occluded and generates occlusion information on whether the object feature points are occluded.

$\begin{matrix} {P_{i} = \frac{p_{i} - {\frac{1}{8}{\sum\limits_{i = 1}^{8}p_{i}}}}{\sum\limits_{i = 1}^{8}\sqrt{\left( {p_{i} - {\frac{1}{8}{\sum\limits_{i = 1}^{8}p_{i}}}} \right)\left( {p_{i} - {\frac{1}{8}{\sum\limits_{i = 1}^{8}p_{i}}}} \right)^{T}}}} & \left\lbrack {{Equation}\mspace{20mu} 7} \right\rbrack \end{matrix}$

Here, p_(i)=(x_(i), y_(i)) is a coordinate of a feature point, and Pi is a normalized coordinate of the feature point. When a feature point coordinate matrix X=(x, y)^(T) of the (N−1)-th frame and a feature point coordinate matrix X′=(x′, y′)^(T) of the N-th frame are normalized feature point coordinates, it is possible to estimate whether there are occluded feature points by using an affine transformation. E=|T(X)−X′|  [Equation 8]

Here, T(X) is the affine transformation whose input is a coordinate matrix X of the (N−1)-th frame, and X′ is a coordinate matrix of the N-th frame. The affine transformation T is a transformation matrix in which the value E is minimized.

$\begin{matrix} {{{S_{x} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}\mspace{50mu} S_{y}}}} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}y_{i}}}}}S_{x^{\prime}} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}^{\prime}\mspace{40mu} S_{y^{\prime}}}}} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}y_{i}^{\prime}}}}}{S_{xx} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}^{2}\mspace{40mu} S_{yy}}}} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}y_{i}^{2}}}}}{S_{xy} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}y_{i}}}}}{S_{{xx}^{\prime}} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}x_{i}^{\prime}\mspace{31mu} S_{{yy}^{\prime}}}}} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{y_{i}y_{i}^{\prime}S_{{xy}^{\prime}}}}} = {{\frac{1}{n}{\sum\limits_{i = 1}^{n}{x_{i}y_{i}^{\prime}\mspace{31mu} S_{{yx}^{\prime}}}}} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}{y_{i}x_{i}^{\prime}}}}}}}}} & \left\lbrack {{Equation}\mspace{20mu} 9} \right\rbrack \end{matrix}$

Here, (x_(i), y_(i)) is a coordinate of the object feature points estimated in the previous frame ((N−1)-th frame), and (x_(i)′, y_(i)′) is a coordinate of the object feature points estimated in the current frame (N-th frame).

$\begin{matrix} {{{T\begin{pmatrix} x \\ y \end{pmatrix}} = {{\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix}} + \begin{pmatrix} t_{x} \\ t_{y} \end{pmatrix}}},{t_{x} = {{S_{x^{\prime}}\mspace{25mu} t_{y}} = S_{y^{\prime}}}}} & \left\lbrack {{Equation}\mspace{20mu} 10} \right\rbrack \\ {{\begin{pmatrix} a & b \\ c & d \end{pmatrix} = {\frac{1}{\Delta}\begin{pmatrix} S_{{xx}^{\prime}} & S_{{yx}^{\prime}} \\ S_{{xy}^{\prime}} & S_{{yy}^{\prime}} \end{pmatrix}\begin{pmatrix} S_{yy} & {- S_{xy}} \\ {- S_{xy}} & S_{xx} \end{pmatrix}}},{\Delta = {{S_{xx}S_{yy}} - S_{xy}^{2}}}} & \left\lbrack {{Equation}\mspace{20mu} 11} \right\rbrack \end{matrix}$

The affine transformation is determined by 6 elements as shown in Equation 10. When the feature point in the current frame (N-th frame) is P_(i) ^(n)(x, y)=(x_(i) ^(n), y_(i) ^(n)), and when the feature point obtained by performing the affine transformation with respect to the feature point in the previous frame ((N−1)-th frame is {tilde over (P)}_(i) ^(n-1)(x, y)=({tilde over (x)}_(i) ^(n-1),{tilde over (y)}_(i) ^(n-1)), a distance between the feature point in the current frame and the feature point obtained by performing the affine transformation is represented by Equation 12.

$\begin{matrix} \begin{matrix} {D_{i} = {{{P_{i}^{n}\left( {x,y} \right)} - {T\left( {P_{i}^{n - 1}\left( {x,y} \right)} \right)}}}} \\ {= {{{P_{i}^{n}\left( {x,y} \right)} - {{\overset{\sim}{P}}_{i}^{n - 1}\left( {x,y} \right)}}}} \\ {= \sqrt{{\left( {x_{i}^{n} - {\overset{\sim}{x}}_{i}^{n - 1}} \right)\left( {x_{i}^{n} - {\overset{\sim}{x}}_{i}^{n - 1}} \right)} + {\left( {y_{i}^{n} - {\overset{\sim}{y}}_{i}^{n - 1}} \right)\left( {y_{i}^{n} - {\overset{\sim}{y}}_{i}^{n - 1}} \right)}}} \end{matrix} & \left\lbrack {{Equation}\mspace{20mu} 12} \right\rbrack \end{matrix}$

The occlusion estimation unit 260 estimates that the object feature point of which the value D_(i) is greater than a predetermined reference value is an occluded feature point and that P_(i) ^(n-1) is a coordinate of the current frame.

A pattern estimation unit 270 generates pattern information on the main parts of the object. Specifically, the pattern estimation unit 270 generates information on blinking of eyes and information on the shape of a mouth. Information on the mouth includes information on whether the mouth is opened or closed.

In order to obtain the information on the blinking of the eyes, the pattern estimation unit 270 calculates an x-axis directional edge and a y-axis directional edge by applying a Sobel operator to a predetermined region including a feature point of the eyes and calculates a correlation coefficient between a gradient map of the previous frame and a gradient map of the current frame. An edge can be calculated by differentiating the image in the x-axis and the y-axis directions by applying a Sobel mask as the most typical differential operator for detecting a profile. When the correlation coefficient between the aforementioned gradient maps is less than a predetermined reference value, the pattern estimation unit 270 determines that the eye blinks and calculates the information on the blinking of the eyes as the pattern information.

In order to obtain the information on the shape of the mouth, the pattern estimation unit 270 calculates edge points of the mouth and estimates an ellipse pattern constructed with the edge points. Specifically, it is possible to calculate a mean value of the gray levels of a predetermined region including two feature points of the mouth and one feature point of the upper lip, convert the image of the current frame into a binary image based on the calculated mean value, and estimate the mouth shape pattern depending on the current frame by searching the converted binary image for an edge point. The mouth shape pattern can be estimated by using an ellipse fitting process. An ellipse function can be represented by Equation 13. f(x)=ax ² +bxy+cy ² +dx+ey=1  [Equation 13] (x ² ,x,y ² ,x,y)(a,b,c,d,e)^(T)=1  [Equation 14] d(i)=(x _(i) ² ,x _(i) y _(i) ,y _(i) ² ,x _(i) ,y)  [Equation 15] â=[D ^(T) D] ⁻¹ D ^(T) l  [Equation 16]

When the edge points of the mouth are p₁ to p_(N), and p_(i)=[x_(i), y_(i)]T, Equation 13 is an ellipse function with respect to edge points of the mouth, and Equation 14 is a vector form of Equation 13. When a dimension of a vector matrix D is N×5, a row d(i) of the vector matrix D is represented by Equation 15. The ellipse function of Equation 13 may be determined by a parameter a=[a, b, c, d, e]^(T). In order to find the parameter a, it is possible to calculate â that approximately satisfies p₁ to p_(N) by using Equation 16. l is an N×1 column vector whose elements are 1.

Hereinafter, a method of tracking an object according to an embodiment of the present invention will be described in detail with reference to the attached drawings and embodiments. The same description as that of the aforementioned apparatus for tracking an object will be omitted.

FIG. 5 is a flowchart illustrating a method of tracking an object according to an embodiment of the present invention. The method of tracking an object according to the current embodiment includes the following operations which are processed according to a predetermined time sequence.

In operation 310, when the object starts to be tracked, the initialization unit 110 receives a video image of the first frame.

In operation 320, the initialization unit 110 detects a face image from the video image of the first frame. Although it is not shown in FIG. 5, if the face image is not detected from the first frame, the initialization unit 110 receives a video face image of the next frame and performs an operation of detecting a face and this process is repeated until a face image is detected. Specifically, it is preferable to detect a front face rather than to detect a side face or oblique face so as to accurately track the face and accurately estimate poses. As an example of a method of detecting a face, a method of detecting a front face is suggested by Paul Viola and Michael Jones in “Robust Real-Time Face Detection (2004).”

In operation 330, the initialization unit 110 detects eight face feature points (refer to the image A illustrated in FIG. 3) which represent main features of the face in the face image detected in operation 320. The existing methods of detecting the face feature points are the AAM, the ASM, and the like.

In operation 340, the first tracking unit 120 determines object feature point candidates of the current frame (the N-th frame) by using a difference between a pixel value of the (N−1)-th frame and a pixel value of the N-th frame. Specifically, in the current embodiment, the first tracking unit 120 calculates an optical flow in which a value ε(V) is minimized by using the LKT algorithm represented by Equations 1 to 5 and searches for a moving location of the object feature points according to the calculated optical flow.

In operation 350, the second tracking unit 130 searches a predetermined region surrounding the face feature point candidates of the N-th frame for a template similar to the template including the face feature points of the (N−1)-th frame. The found locations are locations of the face feature points which are moved in the N-th frame. It is advantageous in a processing time and a real time tracking method that a predetermined region surrounding face feature point candidates as compared with a case where a similar template is searched for in all the given frames.

In operation 360, the second tracking unit 130 transmits the information on the object feature points determined in operation 350 to a display device so as to externally display the tracking result on the object feature points as shown in FIG. 7.

In operation 370, the apparatus for tracking the object determines whether a termination signal of the tracking mode is input. When the tracking mode is not terminated, operations 340 to 370 are repeated.

Hereinafter, a method of calculating object pose information according to an embodiment of the present invention will be described in detail with reference to FIG. 6.

Since operations 410 to 450 are the same as the aforementioned operations 310 to 350, the same description will be omitted here.

In operation 461, the pose estimation unit 250 estimates a direction in which the face looks at by using location information of face feature points determined in operation 450. Specifically, the pose estimation unit 250 calculates a rotation matrix having a roll, a pitch, and a yaw as components. In operation 462, the occlusion estimation unit 260 estimates whether the face feature points are occluded and calculates occlusion information as a result of estimation on whether the face feature points are occluded. In operation 463, the pattern estimation unit 260 estimates a blinking pattern of the eyes and a pattern of the mouth shape which are the main parts of the face and calculates the pattern information as a result of estimation of the patterns.

In operation 470, the object information generation unit 240 outputs the rotation matrix, the occlusion information, and the pattern information, which are calculated in operations 461 to 463, respectively, to an external information processing device.

In operation 480, the object pose information calculation apparatus determines whether a termination signal with respect to an object pose information calculation process is input. If the termination signal is not input, operations 440 to 480 are performed again.

FIG. 7 illustrates an experimental result of a method of calculating object pose information. An image 502 is an initialized image. Eight face feature points of the image 502 are stored in the initialization unit. Images 504 to 512 are taken in various facial expressions and angles. Feature points estimated by tracking the object based on the image 502 are represented in the images 504 to 512. Experimental results according to an embodiment of the present invention are shown in the images 504, 508, 510, and 512. The pose information on the direction in which the face looks is represented in the image 504. The information on the mouth shape is represented in the image 512. In addition, the results obtained by tracking the occluded feature points among the face feature points are represented in the images 508 and 510. The image 506 is obtained by tracking the occluded feature points by using only the existing LKT method. In the image 506, it is shown that the location of the right eye is inaccurate.

It is possible to create a composite of a face image by using various angles and expressions by performing a face morphing process by using the object information calculated according to an embodiment of the present invention. In order to create a composite of an image, face image information in various angles is needed in addition to image information on the front face. When information on a face image of a predetermined person is insufficient, it is possible to use previously established image information on a face of a generic model. In addition, it is possible to create composites of various avatar images by using the pattern information on the eyes and the mouth calculated in operation 463. In addition, it is possible to create a composite of a face image by adding accessories to the face image in various angles and expressions. In addition, it is possible to create a composite of a face image at a new angle and having a new expression by using the given face images.

According to an embodiment of the present invention, the object feature point candidates are obtained by using pixel values of neighboring frames. It is possible to reduce a processing time needed for template matching by performing a template matching process in a predetermined region having the object feature point candidates as a center. The tracking of the object is robust in terms of sudden changes in lighting and partial occlusion. In addition, it is possible to track an object in real time with improved accuracy. In addition, according to an embodiment of the present invention, since the pose of the object, the pattern of the object, and the occlusion of the object are determined, detailed information on action patterns of the object can be obtained in real time.

The invention can also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the Internet). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for accomplishing the present invention can be easily construed by programmers skilled in the art to which the present invention pertains.

While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. The exemplary embodiments should be considered in descriptive sense only and not for purposes of limitation. Therefore, the scope of the invention is defined not by the detailed description of the invention but by the appended claims. 

What is claimed is:
 1. A method of tracking an object comprising: detecting predetermined object feature points in a previous frame; estimating object feature point candidates of an N-th (N is a positive integer greater than (frame by using a difference between a pixel value of the previous frame and a pixel value of the N-th frame; searching for a template similar to a predetermined template including the detected object feature points of the previous frame in a search area surrounding the estimated object feature point candidates of the N-th frame; estimating object feature points of the N-th frame based on the searched template of the N-th frame; estimating whether the estimated object feature points of the N-th frame are occluded on the basis of a similarity between the estimated object feature points of the N-th frame and the detected object feature points of the previous frame; and tracking the object based on occlusion information of the detected object feature points of the N-th frame, wherein the tracking is performed based on the detected object feature points of the previous frame corresponding to the occluded object feature points of the N-th frame when the estimated object feature points of the N-th frame are occluded.
 2. The method of claim 1, wherein the object feature point candidates of the N-th frame are estimated by calculating an optical flow depending on the detected object feature points on the basis of the difference between the pixel value of the previous frame and the pixel value of the N-th frame and using the calculated optical flow.
 3. The method of claim 1, wherein the template similar to the template including the detected object feature points is searched for in the predetermined region surrounding the estimated object feature point candidates by using a template matching process.
 4. The method of claim 1, wherein a size of the template including the detected object feature points is less than that of the predetermined region surrounding the object feature point candidates.
 5. The method of claim 1, wherein optical flow is calculated by calculating the difference between the pixel value of the previous frame and the pixel value of the N-th frame based on an LKT (Lucas-Kanade-Tomasi) algorithm, and the object feature point candidates are estimated by using the calculated optical flow.
 6. The method of claim 1, wherein the object feature point is detected by using AAMs (Active Appearance Models) or ASMs (Active Shape Models).
 7. A non-transitory computer-readable recording medium having embodied thereon a computer program for executing the method of claim
 1. 8. A method of calculating object pose information comprising: detecting predetermined object feature points in a previous frame; estimating object feature point candidates of an N-th (N is a positive integer greater than 1) frame by using a difference between a pixel value of the previous frame and a pixel value of the N-th frame; searching for a template similar to a predetermined template including the detected object feature points of the previous frame in a search area surrounding the estimated object feature point candidates of the N-th frame; estimating object feature points of the N-th frame based on the searched template of the N-th frame; calculating object pose information by using coordinate values detected in the previous frame and coordinate values of the object feature points detected in the N-th frame; calculating an affine transformation between coordinate values of object feature points detected in the previous frame and coordinate values of object feature points detected in the N-th frame; estimating the object feature points of the N-th frame by using the coordinate values of the feature points of the object detected in the previous frame and the calculated affine transformation; and calculating a similarity between the estimated object feature points of the N-th frame and the calculated object feature points and estimating whether the object feature points are occluded on the basis of the calculated similarity, wherein the object pose information further includes the occlusion information on whether the object feature points in the N-th frame are occluded.
 9. The method of claim 8, wherein the object feature points are estimated by estimating 2D (X-Y) locations of the object feature points, and the object pose information is calculated by further considering a 3D model of a general object and a table in which information (Z) on heights of the general object is stored.
 10. The method of claim 8, wherein the object pose information includes rotation matrix information on directions of the object.
 11. The method of claim 8, wherein the template similar to the template including the detected object feature points is searched for in the predetermined region surrounding the estimated object feature point candidates by using a template matching process.
 12. The method of claim 8, wherein the object pose information further includes occlusion information on whether the object feature points are occluded in the N-th frame.
 13. The method of claim 8, wherein the object feature points includes feature points related to eyes and a mouth selected from a human face, and the object pose information further includes information on blinking of the eyes or information on a shape of the mouth as pattern information.
 14. The method of claim 8, wherein the object feature points include feature points related to an eye selected from a human face, wherein the method of calculating object pose information further comprises calculating an edge of an eye region by applying a Sobel operator to the N-th frame and the previous frame, generating a gradient map depending on the calculated edge of the eye region, and estimating whether the eyes blink according to a similarity or correlation between the gradient map of the N-th frame and the gradient map of the previous frame, and wherein the object pose information further includes the pattern information on the blinking of the eyes.
 15. The method of claim 8, wherein the object feature points include feature points related to a mouth selected from a human face, wherein the method of calculating object pose information further comprises converting a predetermined image including the feature points related to the mouth into a binary level image and estimating an ellipse function that represents an edge of the mouth by using an ellipse fitting process, and wherein the object pose information further includes the pattern information on the shape of the mouth according to the estimated ellipse function.
 16. A non-transitory computer-readable recording medium having embodied thereon a computer program for executing the method of claim
 8. 17. An apparatus for tracking a video image object, including at least one processing device, the apparatus comprising: an initialization unit which initializes, using the at least one processing device, a tracking process by detecting object feature points from a video image; a first tracking unit which estimates object feature point candidates of an N-th (N is a positive integer greater than 1) frame by using a difference between a pixel value of a previous frame and a pixel value of the N-th frame; and a second tracking unit which searches for a template similar to a predetermined template including the detected object feature points of the previous frame in a search area surrounding the estimated object feature point candidates of the N-th frame and estimates object feature points of the N-th frame based on the searched template of the N-th frame, and estimates whether the estimated object feature points of the N-th frame are occluded on the basis of a similarity between the estimated object feature points of the N-th frame and the detected object feature points of the previous frame; and tracks the object based on occlusion information of the detected object feature points of the N-th frame, wherein the tracking is performed based on the detected object feature points of the previous frame corresponding to the occluded object feature points of the N-th frame when the estimated object feature points of the N-th frame are occluded.
 18. An apparatus for calculating object pose information, including at least one processing device, the apparatus comprising: an initialization unit which initializes, using the at least one processing device, a tracking process by detecting object feature points from a video image; a first tracking unit which estimates object feature point candidates of an N-th (N is a positive integer greater than 1) frame by using a difference between a pixel value of a previous frame and a pixel value of the N-th frame; a second tracking unit which searches for a template similar to a predetermined template including the detected object feature points of the previous frame in a search area surrounding the estimated object feature point candidates of the N-th frame and estimates object feature points of the N-th frame based on the searched template of the N-th frame; and an object pose information calculation unit which calculates object pose information by using coordinate values of the object feature points detected by initializing the tracking process and coordinate values of the object feature points of the N-th frame, wherein the object pose calculation unit includes a pose estimation unit generating rotation matrix information on directions of the object, an occlusion estimation unit generating occlusion information on whether the object feature points are occluded, and a pattern estimation unit generating pattern information on blinking of eyes and a shape of a mouth. 